package com.example;

import java.net.UnknownHostException;

import javax.servlet.http.HttpServletRequest;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@SpringBootApplication
public class SpringbootDockerApplication {

    public static void main(String[] args) throws UnknownHostException {
        SpringApplication.run(SpringbootDockerApplication.class, args);
    }

    @ResponseBody
    @GetMapping("/hello")
    public Object hello(String str, HttpServletRequest request){
        return "Hello (app2): " + str;
    }
}
